\doxysection{C\+:/\+Users/\+ASUS/\+Desktop/dm-\/ctrl\+H7-\/balance-\/9025test/\+Drivers/\+STM32\+H7xx\+\_\+\+HAL\+\_\+\+Driver/\+Src/stm32h7xx\+\_\+hal\+\_\+tim\+\_\+ex.c File Reference}
\hypertarget{stm32h7xx__hal__tim__ex_8c}{}\label{stm32h7xx__hal__tim__ex_8c}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Drivers/STM32H7xx\_HAL\_Driver/Src/stm32h7xx\_hal\_tim\_ex.c@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Drivers/STM32H7xx\_HAL\_Driver/Src/stm32h7xx\_hal\_tim\_ex.c}}


TIM HAL module driver. This file provides firmware functions to manage the following functionalities of the Timer Extended peripheral\+:  


{\ttfamily \#include "{}stm32h7xx\+\_\+hal.\+h"{}}\newline


\doxysubsection{Detailed Description}
TIM HAL module driver. This file provides firmware functions to manage the following functionalities of the Timer Extended peripheral\+: 

\begin{DoxyAuthor}{Author}
MCD Application Team
\begin{DoxyItemize}
\item Time Hall Sensor Interface Initialization
\item Time Hall Sensor Interface Start
\item Time Complementary signal break and dead time configuration
\item Time Master and Slave synchronization configuration
\item Time Output Compare/\+PWM Channel Configuration (for channels 5 and 6)
\item Timer remapping capabilities configuration
\end{DoxyItemize}
\end{DoxyAuthor}
\begin{DoxyAttention}{Attention}

\end{DoxyAttention}
Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-\/\+IS.

\begin{DoxyVerb}==============================================================================
                    ##### TIMER Extended features #####
==============================================================================
[..]
  The Timer Extended features include:
  (#) Complementary outputs with programmable dead-time for :
      (++) Output Compare
      (++) PWM generation (Edge and Center-aligned Mode)
      (++) One-pulse mode output
  (#) Synchronization circuit to control the timer with external signals and to
      interconnect several timers together.
  (#) Break input to put the timer output signals in reset state or in a known state.
  (#) Supports incremental (quadrature) encoder and hall-sensor circuitry for
      positioning purposes

          ##### How to use this driver #####
==============================================================================
  [..]
   (#) Initialize the TIM low level resources by implementing the following functions
       depending on the selected feature:
         (++) Hall Sensor output : HAL_TIMEx_HallSensor_MspInit()

   (#) Initialize the TIM low level resources :
      (##) Enable the TIM interface clock using __HAL_RCC_TIMx_CLK_ENABLE();
      (##) TIM pins configuration
          (+++) Enable the clock for the TIM GPIOs using the following function:
            __HAL_RCC_GPIOx_CLK_ENABLE();
          (+++) Configure these TIM pins in Alternate function mode using HAL_GPIO_Init();

   (#) The external Clock can be configured, if needed (the default clock is the
       internal clock from the APBx), using the following function:
       HAL_TIM_ConfigClockSource, the clock configuration should be done before
       any start function.

   (#) Configure the TIM in the desired functioning mode using one of the
       initialization function of this driver:
        (++) HAL_TIMEx_HallSensor_Init() and HAL_TIMEx_ConfigCommutEvent(): to use the
             Timer Hall Sensor Interface and the commutation event with the corresponding
             Interrupt and DMA request if needed (Note that One Timer is used to interface
             with the Hall sensor Interface and another Timer should be used to use
             the commutation event).

   (#) Activate the TIM peripheral using one of the start functions:
         (++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(),
              HAL_TIMEx_OCN_Start_IT()
         (++) Complementary PWM generation : HAL_TIMEx_PWMN_Start(), HAL_TIMEx_PWMN_Start_DMA(),
              HAL_TIMEx_PWMN_Start_IT()
         (++) Complementary One-pulse mode output : HAL_TIMEx_OnePulseN_Start(), HAL_TIMEx_OnePulseN_Start_IT()
         (++) Hall Sensor output : HAL_TIMEx_HallSensor_Start(), HAL_TIMEx_HallSensor_Start_DMA(),
              HAL_TIMEx_HallSensor_Start_IT().
\end{DoxyVerb}
 